<?php
/**
 * Created by PhpStorm.
 * User: Frings
 * Date: 2017/4/26
 * Time: 13:57
 */

use yii\helpers\Url;

$web = Url::base();
?>

<script type="text/javascript">


</script>


<div class="form-horizontal" id="menu_submit_form">
    <input type="hidden" id="id" name="id" class="form-control"
           value="<?= isset($item['id']) != null ? $item['id'] : '' ?>">
    <input type="hidden" id="league_id" name="league_id" class="form-control"
           value="<?= isset($item['league_id']) ? $item['league_id'] : '0' ?>">
    <input type="hidden" id="parent_id" name="parent_id" class="form-control"
           value="<?= isset($item['parent_id']) ? $item['parent_id'] : '' ?>">

    <div class="form-group" style=" margin-top: 5px">
        <label class="control-label col-lg-2" for="name">上级菜单：</label>
        <div class="col-lg-10">
            <input type="text" id="parent_name" name="parent_name" disabled="disabled" class="form-control"
                   value="<?= $item != null ? $item['parent_name'] : '' ?>">
        </div>
    </div>

    <div class="form-group" style=" margin-top: 5px">
        <label class="control-label col-lg-2" for="name"><span class="font-color-attention">*</span>菜单名称：</label>
        <div class="col-lg-10">
            <input type="text" id="name" name="name" class="form-control"
                   value="<?= isset($item['name']) ? $item['name'] : '' ?>">
        </div>
    </div>

    <div class="form-group" style=" margin-top: 5px">
        <label class="control-label col-lg-2" for="controller">controller：</label>
        <div class="col-lg-10">
            <input type="text" id="controller" name="controller" class="form-control"
                   value="<?= isset($item['controller']) ? $item['controller'] : '' ?>">
        </div>
    </div>

    <div class="form-group" style=" margin-top: 5px">
        <label class="control-label col-lg-2" for="action">action：</label>
        <div class="col-lg-10">
            <input type="text" id="action" name="action" class="form-control"
                   value="<?= isset($item['action']) ? $item['action'] : '' ?>">
        </div>
    </div>

    <div class="form-group" style=" margin-top: 5px">
        <label class="control-label col-lg-2" for="icon">icon：</label>
        <div class="col-lg-10">
            <input type="text" id="icon" name="icon" class="form-control"
                   value="<?= isset($item['icon']) ? $item['icon'] : '' ?>">
        </div>
    </div>

    <div class="form-group" style=" margin-top: 5px">
        <label class="control-label col-lg-2" for="sort"><span
                    class="font-color-attention">*</span>排序号：</label>
        <div class="col-lg-10">
            <input type="number" id="sort" name="sort" class="form-control"
                   value="<?= isset($item['sort']) ? $item['sort'] : '' ?>">
        </div>
    </div>

    <div class="form-group" style=" margin-top: 5px">
        <label class="control-label col-lg-2" for="is_enabled">启用：</label>
        <div class="col-lg-10">
            <div class="checkbox-switch-wrapper">
                <input class="checkbox-switch" type="checkbox" id="is_enabled" name="is_enabled"
                    <?php
                    if (isset($item['is_enabled']) && $item['is_enabled'] == 1) {
                        echo 'checked="checked"';
                    } else if (!isset($item['is_enabled'])) {
                        echo 'checked="checked"';
                    }
                    ?>
                >
                <div class="checkbox-switch-circle"></div>
            </div>
        </div>
    </div>
</div>